{strip}

	<div class="divFormFieldLabel" style="position:relative;">Bilder: <a href="javascript:void(0);" class="info">[?]<span>Die Bilder können via Drag&Drop sortiert werden.</span></a></div>
	<div class="divFormFieldInput" id="div{$content.fieldname}_{$obj.obj_id}" style="position:relative;width:540px;">
 		<div id="GallerySortable_{$obj.obj_vers_id}_{$content.fieldname}" style="padding:2px;" class="gallery-view">
		{if is_array($field.images)}
			{foreach name="imageloopX" from=$field.images item=img}
				{include file="forms/gallery_append.tpl" img=$img obj=$obj fieldname=$content.fieldname prefix=$prefix count=$smarty.foreach.imageloopX.iteration}
			{/foreach}
		{/if}
		</div>
	</div>
	<br style="clear:both;" />
{/strip}

	<div class="divFormFieldLabel">vorhandene Bilder wählen</div>
	<div class="divFormFieldInput">
		<a href="javascript:void(0);" onclick="{strip}{literal}
			CMS.FileManager.open(
			{{/literal}
				root:'media',
				project_id:'{$project_id}',
				multiple:true,
				{literal}
				post_params:{
				{/literal}
					obj_id : '{$obj.obj_id}',
					fieldname : '{$content.fieldname}'
				{literal}
				},
				callback:{
					ccdsfun:'FileManagerReturnGallery',
					ccdsclass:'ccdsFileManager'
				},
				returnfield: {
				{/literal}
					container:xajax.$('GallerySortable_{$obj.obj_vers_id}_{$content.fieldname}')
				{literal}
				}
				});
			{/literal}{/strip}" >{$smarty.config.NaviPanel_filemanager}</a>


	</div>


	<br style="clear:both;" />
	



	{if isset($content.default_path)}

		<div class="divFormFieldLabel">neue Bilder hochloaden</div>
		<div class="divFormFieldInput">
			Alle Dateien werden in &quot;<span id="{$content.fieldname}_{$obj.obj_id}_path_label">{$content.default_path}</span>&quot; gespeichert. (<a href="javascript:void(0);" onclick="{strip}
			{literal}xajax.request({
							ccdsfun:'FileManagerDirSelectorOpen',
							ccdsclass:'ccdsFileManager'	
			},
			{
				parameters:
					[
						{{/literal}
							root:'media',
							dir:'/',
							project_id:'{$project.project_id}',
							field:'{$content.fieldname}_{$obj.obj_id}_path',
						{literal}}
					]
				}
				);
			{/literal}{/strip}">Zielverzeichnis ändern</a>)<br />
			<div style="width:400px;">
				<input type="hidden" name="path" id="{$content.fieldname}_{$obj.obj_id}_path" />
				<input type="input"  name="{$content.fieldname}_{$obj.obj_id}_multiup" id="{$content.fieldname}_{$obj.obj_id}_multiup" />
			</div>
			<br />
			<input type="button" class="" value="Bilder hochladen" onclick="{strip}
			{literal}xajax.request({
							ccdsfun:'ContentEditorGalleryUpload',
							ccdsclass:'ccdsContentEditor'	
			},
			{
				parameters:
					[
						{{/literal}
							obj_id:{$obj.obj_id},
							obj_vers_id:xajax.$('obj_vers_id_{$obj.obj_id}').value,
							path:xajax.$('{$content.fieldname}_{$obj.obj_id}_path').value,
							filefield:'{$content.fieldname}_{$obj.obj_id}_multiup',
							fieldname:'{$content.fieldname}'
						{literal}}
					],
					mode:'SWFupload',
					SWFfield:'{/literal}{$content.fieldname}_{$obj.obj_id}_multiup{literal}',
					context:{/literal} xajax.$('GallerySortable_{$obj.obj_vers_id}_{$content.fieldname}'){literal}
				}
				);
			{/literal}{/strip}" />
		</div>
	{/if}
	<br style="clear:both;" />

